package org.TCC_NOVO.dao;

public class JPADAOFactory {

    private static JPADAOFactory daoFact;

    public static JPADAOFactory getInstance() {
        if (daoFact == null) {
            daoFact = new JPADAOFactory();
        }
        return daoFact;
    }
    private JPADAOUsuario daoUsuario;
    private JPADAOPapel daoPapel;

    private JPADAOFactory() { }

    public JPADAOUsuario getDAOUsuario() throws Exception {
        if (daoUsuario == null) {
            daoUsuario = new JPADAOUsuario();
        }
        return daoUsuario;
    }

    public JPADAOPapel getDAOPapel() throws Exception {
        if (daoPapel == null)
            daoPapel = new JPADAOPapel();
        return daoPapel;
    }
}
